package com.cc.controller;

import com.cc.dto.BookParam;
import com.cc.entity.Book;
import com.cc.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author CC
 * @version 1.0
 * @description: 图书控制器
 * @date 2025/6/16 14:47
 */
@RestController
@RequestMapping("/book")
public class BookController {

    @Autowired
    BookService bookService;
    //获取书籍列表
    @RequestMapping("/list")
    public List<Book> list(@RequestBody BookParam bookParam){
        return bookService.list(bookParam);
    }
}
